package iscript.coreFramework.data 
{
	import flash.utils.Dictionary;
	import iscript.coreFramework.util.DictionaryUtil;
	public class Asset 
	{
		
		public function Asset() 
		{
			
		}
		
		/*static private var _bitmap:Dictionary = new Dictionary();
		static private var _swf:Dictionary = new Dictionary();
		static private var _font:Dictionary = new Dictionary();
		static private var _sound:Dictionary = new Dictionary();
		*/
		
		static public const Sound:String = "SOUND";
		static public const SWF:String = "SWF";
		static public const BITMAP:String = "BITMAP";
		static public const FONT:String = "FONT";
		
		static private var _resource:Dictionary = new Dictionary();
		
		//static public function  push(StageName:String="dDefault",ResouceName:String,Resouce:Object,Tag:String):void {
		static public function add(ResouceName:String,Resouce:Object):void {
				_resource[ResouceName] = Resouce;
		    }
		 
		static public function get(ResouceName:String):Object {
			  if (!has(ResouceName)) return null;
			  return 	_resource[ResouceName] ;
		    }	
			
		static public function has(ResouceName:String):Boolean {
			  return DictionaryUtil.hasKey(_resource, ResouceName);
		    }	
		
		static public function remove(ResouceName:String):void {
			   delete _resource[ResouceName];
			}
		
	}

}